package com.wechat.pojo;

import lombok.*;

import javax.annotation.Resource;
import javax.xml.bind.annotation.*;
import java.io.Serializable;

/**
 *
 * @author why
 * @date 2018/2/28 0028
 */
@XmlAccessorType(XmlAccessType.FIELD)
// XML文件中的根标识
@XmlRootElement(name = "xml")
// 控制JAXB 绑定类中属性和字段的排序
/*@XmlType(propOrder = {
        "ToUserName",
        "FromUserName",
        "CreateTime",
        "MsgType",
})*/

@Data
@AllArgsConstructor(access = AccessLevel.PUBLIC)
@NoArgsConstructor(access = AccessLevel.PUBLIC)
public class WechatMessage implements Serializable{

    private static final long serialVersionUID = -732789561777064385L;

    @NonNull
    @XmlElement(name="ToUserName")
    private String toUserName;

    @NonNull
    @XmlElement(name="FromUserName")
    private String fromUserName;

    @NonNull
    @XmlElement(name="CreateTime")
    private String createTime;

    @NonNull
    @XmlElement(name="MsgType")
    private String msgType;

}
